<html xmlns="http://www.w3.org/1999/xhtml">
  <head>

    <style type="text/css">
        body {
            width:100%;
            height:100%;
    border: 0px;
    margin: 0px;
    padding: 0px;
    font:sans-serif;
    font-size:small;
    }
    #map {
    width: 800px;
    height: 600px;
    border: 1px solid black;
    padding: 0px;
    margin:0px auto;
    margin-top:30px;
    position:relative;
    }
    </style>

    <!--script type="text/javascript" src="http://www.openlayers.org/api/OpenLayers.js"></script-->
    <script type="text/javascript" src="http://xepec.ru/openl/openlayers/lib/OpenLayers.js"></script>
    
    <script type="text/javascript">
      var lon = 4187888;
      var lat= 7509599;
    var zoom = 10;
    var map, layer;

        function init(){
              map = new OpenLayers.Map('map',
	      {'maxResolution': 360/512/16,
	       'numZoomLevels':15,
	        controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.ScaleLine() ]});	
//            map = new OpenLayers.Map( 'map' );
        map.addControl(new OpenLayers.Control.Permalink());        

        var wms = new OpenLayers.Layer.WMS( "WMS",

/*
change here to suite your setup
*/
                "http://xepec.ru/mapserver?",
                {map: 'osm/osm.map', 


        layers: 'default', 
        format: 'aggpng24',
//	format: 'svg',
        transparent: 'off'},
                {maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
                scales: [5000,10000,25000,50000,100000,250000,500000,
                         1000000,2500000,5000000,10000000,25000000,50000000,100000000],
                units: 'm',
                projection:new OpenLayers.Projection("EPSG:900913"),
                gutter:0,
                ratio:1,
                wrapDateLine: true,
                isBaselayer:true,
                singleTile:false,
                transitionEffect:'resize'} );
//var vector = new OpenLayers.Layer.Vector("Editable Vectors");


//map.setCenter(new OpenLayers.LonLat(4187888, 7509599), 10);

            var newl = new OpenLayers.Layer.Text( "text", { location:"./textfile.txt", projection: new OpenLayers.Projection("EPSG:900913")} );
	    
//	    point	title	description	iconSize    iconOffset  icon
		//7509599,4187888	my purple title	my purple description<br/>is great.	21,25	-10,-25 	http://xepec.ru/openl/openlayers/img/marker-new2.png
//		7492117,4206000	title	description	21,25	-10,-25	http://xepec.ru/openl/openlayers/img/marker.png

            map.addLayer(newl);

            var markers = new OpenLayers.Layer.Markers( "Markers" );
            map.addLayer(markers);

            var size = new OpenLayers.Size(10,17);
            var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
            var icon = new OpenLayers.Icon('http://xepec.ru/openl/openlayers/img/marker-gold.png',size,offset);
//           markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(4187888,7509599),icon));

            var halfIcon = icon.clone();
//            markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(4206000,7492117),halfIcon));

    //        marker = new OpenLayers.Marker(new OpenLayers.LonLat(4215028,7541010),icon.clone());
  //          marker.events.register('mousedown', marker, function(evt) { alert(this.icon.url); OpenLayers.Event.stop(evt); });
//            markers.addMarker(marker); 
	    
            //map.zoomToMaxExtent();




            map.addLayers([wms]);
            if(!map.getCenter())
                map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
//            map.addControl(new OpenLayers.Control.Scale('scale'));
            map.addControl(new OpenLayers.Control.Permalink('permalink'));
            map.addControl(new OpenLayers.Control.MousePosition());
        }
    </script>
  </head>

<body onload="init()">
    <div id="map">
    </div>
<a href='#' onclick="map.setCenter(new OpenLayers.LonLat(4187888, 7509599), 12);">Место продажи водки копыловка</a><br>
<a href='#' onclick="map.setCenter(new OpenLayers.LonLat(4206000, 7492117), 12);">Здесь живу я</a><br>
<a href='#' onclick="map.setCenter(new OpenLayers.LonLat(4215028, 7541010), 12);">Место производства водки копыловка</a><br>
</body>
</html>
 
